<%-- 
    Document   : TerimaBarangPusat
    Created on : Nov 22, 2013, 12:03:59 PM
    Author     : tea milandi
--%>

<%@page import="java.sql.ResultSet"%>
<%@page import="bean.StokBarang"%>
<%@page import="bean.PenerimaanBarang"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Terima Barang Pusat</title>
    </head>
    <body bgcolor="FFC373"> 
        <%
            PenerimaanBarang penerimaan = new PenerimaanBarang();
            String kodePenerimaan = penerimaan.getKodePenerimaan();
        %>
        <form action="TerimaBarang">
            <center>
                <br><br><br><br><br><br><br><br><br>
                <table border="0" width="370">
                    <tr>
                        <td colspan="2" align="center"><img src="gambar/logo asmart.png" width="300" height="84"/></td>
                    </tr>
                    <tr>
                        <td colspan="2" align="center"><font face="Disko" size="6px">FORM TERIMA BARANG</font></td>
                    </tr>
                    <tr>
                        <td colspan="2">
                            <table border="0" align="center" width="290">
                                <tr>
                                    <td width="49%"><font face="Francis Gothic Reduced">KODE PENERIMAAN</font></td>
                                    <td><input type="text" size="17" maxlength="8" name="kode_penerimaan" value="<%=kodePenerimaan%>" disabled="disabled"></td>
                                </tr>
                                <tr>
                                    <td><font face="Francis Gothic Reduced">JUMLAH BARANG</font></td>
                                    <td><input type="text" size="17" maxlength="6" name="jumlahbarang"></td>
                                </tr>
                                <tr>
                                    <td><font face="Francis Gothic Reduced">HARGA BARANG</font></td>
                                    <td><input type="text" size="17" maxlength="6" name="hargabarang"></td>
                                </tr>
                                <tr>
                                    <td><font face="Francis Gothic Reduced">NAMA BARANG</font></td>
                                    <td><select name="idbarang"><%
                                        StokBarang barangPusat = new StokBarang();
                                        ResultSet resultSet = barangPusat.tampilBarang();
                                        while (resultSet.next()) {
                                            out.print("<option value='" + resultSet.getString("idbarang") + "'>" + resultSet.getString("namabarang") + "</option>");
                                        }
                                            %>
                                        </select></td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                    <tr>
                        <td align="center" width="48%"><a href="HomePusat.jsp"><img src="gambar/back_button.png" height="40" width="120"></a></td>
                        <td align="center"><input type="image" src="gambar/terima_barang_button.png" height="50" width="120" name="terima"></td>            
                    </tr>
                </table>
            </center>
        </form>
    </body>
</html>
